package com.example.blog.controller;

import com.example.blog.pojo.FriendLink;
import com.example.blog.service.FriendService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;
import java.util.List;

/**
 * name: 东北宋小宝
 * date: 2020/9/5
 */
@Controller
public class FriendsShowController {

    @Resource
    private FriendService friendService;
    @GetMapping("/friends")
    public String toFriends(Model model){
        List<FriendLink> friendLink = friendService.getAllFriendLink();
        model.addAttribute("friendLink",friendLink);
        return "friends";
    }
}
